# SkyServe YAML to launch a service with mixed spot and on-demand instances.
# The policy will dynamically fallback to on-demand instances when spot instances are not available. 

service:
  readiness_probe: /health
  replica_policy:
    min_replicas: 2
    max_replicas: 3
    target_qps_per_replica: 1
    dynamic_ondemand_fallback: true

resources:
  any_of:
  - zone: us-central1-a
  - region: us-east1
  ports: 8081
  cpus: 2+
  # use_spot is needed for ondemand fallback
  use_spot: true

workdir: examples/serve/http_server

run: python3 server.py
